\(\int \frac {c+d x^2}{x^4 (a+b x^2)} \, dx\) [207]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 59 \[ \int \frac {c+d x^2}{x^4 \left (a+b x^2\right )} \, dx=-\frac {c}{3 a x^3}+\frac {b c-a d}{a^2 x}+\frac {\sqrt {b} (b c-a d) \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a^{5/2}} \]

[Out]

-1/3*c/a/x^3+(-a*d+b*c)/a^2/x+(-a*d+b*c)*arctan(x*b^(1/2)/a^(1/2))*b^(1/2)/a^(5/2)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {464, 331, 211} \[ \int \frac {c+d x^2}{x^4 \left (a+b x^2\right )} \, dx=\frac {\sqrt {b} \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) (b c-a d)}{a^{5/2}}+\frac {b c-a d}{a^2 x}-\frac {c}{3 a x^3} \]

[In]

Int[(c + d*x^2)/(x^4*(a + b*x^2)),x]

[Out]

-1/3*c/(a*x^3) + (b*c - a*d)/(a^2*x) + (Sqrt[b]*(b*c - a*d)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/a^(5/2)

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 331

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c*x)^(m + 1)*((a + b*x^n)^(p + 1)/(a*c
*(m + 1))), x] - Dist[b*((m + n*(p + 1) + 1)/(a*c^n*(m + 1))), Int[(c*x)^(m + n)*(a + b*x^n)^p, x], x] /; Free
Q[{a, b, c, p}, x] && IGtQ[n, 0] && LtQ[m, -1] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 464

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[c*(e*x)^(m +
 1)*((a + b*x^n)^(p + 1)/(a*e*(m + 1))), x] + Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(a*e^n*(m + 1)), In
t[(e*x)^(m + n)*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[n] ||
GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1])) &&  !ILtQ[p, -1]

Rubi steps \begin{align*} \text {integral}& = -\frac {c}{3 a x^3}-\frac {(3 b c-3 a d) \int \frac {1}{x^2 \left (a+b x^2\right )} \, dx}{3 a} \\ & = -\frac {c}{3 a x^3}+\frac {b c-a d}{a^2 x}+\frac {(b (b c-a d)) \int \frac {1}{a+b x^2} \, dx}{a^2} \\ & = -\frac {c}{3 a x^3}+\frac {b c-a d}{a^2 x}+\frac {\sqrt {b} (b c-a d) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a^{5/2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.02 \[ \int \frac {c+d x^2}{x^4 \left (a+b x^2\right )} \, dx=-\frac {c}{3 a x^3}+\frac {b c-a d}{a^2 x}-\frac {\sqrt {b} (-b c+a d) \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a^{5/2}} \]

[In]

Integrate[(c + d*x^2)/(x^4*(a + b*x^2)),x]

[Out]

-1/3*c/(a*x^3) + (b*c - a*d)/(a^2*x) - (Sqrt[b]*(-(b*c) + a*d)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/a^(5/2)

Maple [A] (verified)

Time = 2.64 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.93

method result size
default \(-\frac {c}{3 a \,x^{3}}-\frac {a d -b c}{a^{2} x}-\frac {\left (a d -b c \right ) b \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{a^{2} \sqrt {a b}}\) \(55\)
risch \(\frac {-\frac {\left (a d -b c \right ) x^{2}}{a^{2}}-\frac {c}{3 a}}{x^{3}}+\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (a^{5} \textit {\_Z}^{2}+a^{2} b \,d^{2}-2 a \,b^{2} c d +c^{2} b^{3}\right )}{\sum }\textit {\_R} \ln \left (\left (3 \textit {\_R}^{2} a^{5}+2 a^{2} b \,d^{2}-4 a \,b^{2} c d +2 c^{2} b^{3}\right ) x +\left (a^{4} d -a^{3} b c \right ) \textit {\_R} \right )\right )}{2}\) \(121\)

[In]

int((d*x^2+c)/x^4/(b*x^2+a),x,method=_RETURNVERBOSE)

[Out]

-1/3*c/a/x^3-(a*d-b*c)/a^2/x-(a*d-b*c)*b/a^2/(a*b)^(1/2)*arctan(b*x/(a*b)^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 136, normalized size of antiderivative = 2.31 \[ \int \frac {c+d x^2}{x^4 \left (a+b x^2\right )} \, dx=\left [-\frac {3 \, {\left (b c - a d\right )} x^{3} \sqrt {-\frac {b}{a}} \log \left (\frac {b x^{2} - 2 \, a x \sqrt {-\frac {b}{a}} - a}{b x^{2} + a}\right ) - 6 \, {\left (b c - a d\right )} x^{2} + 2 \, a c}{6 \, a^{2} x^{3}}, \frac {3 \, {\left (b c - a d\right )} x^{3} \sqrt {\frac {b}{a}} \arctan \left (x \sqrt {\frac {b}{a}}\right ) + 3 \, {\left (b c - a d\right )} x^{2} - a c}{3 \, a^{2} x^{3}}\right ] \]

[In]

integrate((d*x^2+c)/x^4/(b*x^2+a),x, algorithm="fricas")

[Out]

[-1/6*(3*(b*c - a*d)*x^3*sqrt(-b/a)*log((b*x^2 - 2*a*x*sqrt(-b/a) - a)/(b*x^2 + a)) - 6*(b*c - a*d)*x^2 + 2*a*
c)/(a^2*x^3), 1/3*(3*(b*c - a*d)*x^3*sqrt(b/a)*arctan(x*sqrt(b/a)) + 3*(b*c - a*d)*x^2 - a*c)/(a^2*x^3)]

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 129 vs. \(2 (49) = 98\).

Time = 0.23 (sec) , antiderivative size = 129, normalized size of antiderivative = 2.19 \[ \int \frac {c+d x^2}{x^4 \left (a+b x^2\right )} \, dx=\frac {\sqrt {- \frac {b}{a^{5}}} \left (a d - b c\right ) \log {\left (- \frac {a^{3} \sqrt {- \frac {b}{a^{5}}} \left (a d - b c\right )}{a b d - b^{2} c} + x \right )}}{2} - \frac {\sqrt {- \frac {b}{a^{5}}} \left (a d - b c\right ) \log {\left (\frac {a^{3} \sqrt {- \frac {b}{a^{5}}} \left (a d - b c\right )}{a b d - b^{2} c} + x \right )}}{2} + \frac {- a c + x^{2} \left (- 3 a d + 3 b c\right )}{3 a^{2} x^{3}} \]

[In]

integrate((d*x**2+c)/x**4/(b*x**2+a),x)

[Out]

sqrt(-b/a**5)*(a*d - b*c)*log(-a**3*sqrt(-b/a**5)*(a*d - b*c)/(a*b*d - b**2*c) + x)/2 - sqrt(-b/a**5)*(a*d - b
*c)*log(a**3*sqrt(-b/a**5)*(a*d - b*c)/(a*b*d - b**2*c) + x)/2 + (-a*c + x**2*(-3*a*d + 3*b*c))/(3*a**2*x**3)

Maxima [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.95 \[ \int \frac {c+d x^2}{x^4 \left (a+b x^2\right )} \, dx=\frac {{\left (b^{2} c - a b d\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} a^{2}} + \frac {3 \, {\left (b c - a d\right )} x^{2} - a c}{3 \, a^{2} x^{3}} \]

[In]

integrate((d*x^2+c)/x^4/(b*x^2+a),x, algorithm="maxima")

[Out]

(b^2*c - a*b*d)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a^2) + 1/3*(3*(b*c - a*d)*x^2 - a*c)/(a^2*x^3)

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.97 \[ \int \frac {c+d x^2}{x^4 \left (a+b x^2\right )} \, dx=\frac {{\left (b^{2} c - a b d\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} a^{2}} + \frac {3 \, b c x^{2} - 3 \, a d x^{2} - a c}{3 \, a^{2} x^{3}} \]

[In]

integrate((d*x^2+c)/x^4/(b*x^2+a),x, algorithm="giac")

[Out]

(b^2*c - a*b*d)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a^2) + 1/3*(3*b*c*x^2 - 3*a*d*x^2 - a*c)/(a^2*x^3)

Mupad [B] (verification not implemented)

Time = 5.42 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.90 \[ \int \frac {c+d x^2}{x^4 \left (a+b x^2\right )} \, dx=-\frac {\frac {c}{3\,a}+\frac {x^2\,\left (a\,d-b\,c\right )}{a^2}}{x^3}-\frac {\sqrt {b}\,\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )\,\left (a\,d-b\,c\right )}{a^{5/2}} \]

[In]

int((c + d*x^2)/(x^4*(a + b*x^2)),x)

[Out]

- (c/(3*a) + (x^2*(a*d - b*c))/a^2)/x^3 - (b^(1/2)*atan((b^(1/2)*x)/a^(1/2))*(a*d - b*c))/a^(5/2)